import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/home_visitor_record_detail_entity.dart';

HomeVisitorRecordDetailEntity $HomeVisitorRecordDetailEntityFromJson(Map<String, dynamic> json) {
	final HomeVisitorRecordDetailEntity homeVisitorRecordDetailEntity = HomeVisitorRecordDetailEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		homeVisitorRecordDetailEntity.code = code;
	}
	final HomeVisitorRecordDetailObj? obj = jsonConvert.convert<HomeVisitorRecordDetailObj>(json['obj']);
	if (obj != null) {
		homeVisitorRecordDetailEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		homeVisitorRecordDetailEntity.msg = msg;
	}
	return homeVisitorRecordDetailEntity;
}

Map<String, dynamic> $HomeVisitorRecordDetailEntityToJson(HomeVisitorRecordDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

HomeVisitorRecordDetailObj $HomeVisitorRecordDetailObjFromJson(Map<String, dynamic> json) {
	final HomeVisitorRecordDetailObj homeVisitorRecordDetailObj = HomeVisitorRecordDetailObj();
	final HomeVisitorRecordDetailObjInfo? info = jsonConvert.convert<HomeVisitorRecordDetailObjInfo>(json['info']);
	if (info != null) {
		homeVisitorRecordDetailObj.info = info;
	}
	return homeVisitorRecordDetailObj;
}

Map<String, dynamic> $HomeVisitorRecordDetailObjToJson(HomeVisitorRecordDetailObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['info'] = entity.info.toJson();
	return data;
}

HomeVisitorRecordDetailObjInfo $HomeVisitorRecordDetailObjInfoFromJson(Map<String, dynamic> json) {
	final HomeVisitorRecordDetailObjInfo homeVisitorRecordDetailObjInfo = HomeVisitorRecordDetailObjInfo();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		homeVisitorRecordDetailObjInfo.id = id;
	}
	final String? address = jsonConvert.convert<String>(json['address']);
	if (address != null) {
		homeVisitorRecordDetailObjInfo.address = address;
	}
	final String? owner = jsonConvert.convert<String>(json['owner']);
	if (owner != null) {
		homeVisitorRecordDetailObjInfo.owner = owner;
	}
	final String? visitor = jsonConvert.convert<String>(json['visitor']);
	if (visitor != null) {
		homeVisitorRecordDetailObjInfo.visitor = visitor;
	}
	final String? phoneNumber = jsonConvert.convert<String>(json['phoneNumber']);
	if (phoneNumber != null) {
		homeVisitorRecordDetailObjInfo.phoneNumber = phoneNumber;
	}
	final int? visitorNum = jsonConvert.convert<int>(json['visitorNum']);
	if (visitorNum != null) {
		homeVisitorRecordDetailObjInfo.visitorNum = visitorNum;
	}
	final String? visitStartTime = jsonConvert.convert<String>(json['visitStartTime']);
	if (visitStartTime != null) {
		homeVisitorRecordDetailObjInfo.visitStartTime = visitStartTime;
	}
	final String? visitEndTime = jsonConvert.convert<String>(json['visitEndTime']);
	if (visitEndTime != null) {
		homeVisitorRecordDetailObjInfo.visitEndTime = visitEndTime;
	}
	final String? licensePlate = jsonConvert.convert<String>(json['licensePlate']);
	if (licensePlate != null) {
		homeVisitorRecordDetailObjInfo.licensePlate = licensePlate;
	}
	final String? visitReason = jsonConvert.convert<String>(json['visitReason']);
	if (visitReason != null) {
		homeVisitorRecordDetailObjInfo.visitReason = visitReason;
	}
	final String? qrCodeUrl = jsonConvert.convert<String>(json['qrCodeUrl']);
	if (qrCodeUrl != null) {
		homeVisitorRecordDetailObjInfo.qrCodeUrl = qrCodeUrl;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		homeVisitorRecordDetailObjInfo.createTime = createTime;
	}
	return homeVisitorRecordDetailObjInfo;
}

Map<String, dynamic> $HomeVisitorRecordDetailObjInfoToJson(HomeVisitorRecordDetailObjInfo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['address'] = entity.address;
	data['owner'] = entity.owner;
	data['visitor'] = entity.visitor;
	data['phoneNumber'] = entity.phoneNumber;
	data['visitorNum'] = entity.visitorNum;
	data['visitStartTime'] = entity.visitStartTime;
	data['visitEndTime'] = entity.visitEndTime;
	data['licensePlate'] = entity.licensePlate;
	data['visitReason'] = entity.visitReason;
	data['qrCodeUrl'] = entity.qrCodeUrl;
	data['createTime'] = entity.createTime;
	return data;
}